package com.pascuit.gpxhandler.client.datasource;

import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.fields.DataSourceTextField;

/**
 * 
 * @author Parant
 * 
 */
public class UserMockDatasource extends DataSource {

	private static UserMockDatasource instance = null;

	public static UserMockDatasource getInstance() {
		if (instance == null) {
			instance = new UserMockDatasource("supplyCategoryDS");
		}
		return instance;
	}

	public UserMockDatasource(String id) {
		setID(id);
		setRecordXPath("/List/user");
		DataSourceTextField itemNameField = new DataSourceTextField("nickname", "Item", 128, true);
		itemNameField.setPrimaryKey(true);
		setFields(itemNameField);
		setDataURL("usersDB.data.xml");
		setClientOnly(true);
	}
}
